<demo>
支持 duration，表示消息框在 duration 秒后自动关闭，默认值为 3，如果该值设为 0 ，表示不会自动关闭。
</demo>
<template>
  <uu-button @click="defaultDuration">默认 duration</uu-button>
  <uu-button @click="setDuration1">duration 设为 1</uu-button>
  <uu-button @click="setDuration0">duration 设为 0</uu-button>
</template>
    
<script lang="ts">
import { h } from "@vue/runtime-core";
import { UuButton, openUuMessage } from "uu-ui-vue3";
export default {
  components: { UuButton },
  methods: {
    defaultDuration() {
      openUuMessage("This is a message.");
    },
    setDuration1() {
      openUuMessage({
        message: "This is a message.",
        duration: 1,
      });
    },
    setDuration0() {
      openUuMessage({
        message: "This is a message.",
        duration: 0,
        showClose: true,
      });
    },
  },
};
</script>

<style lang="scss">
</style>